//package com.gxa.k12.auth.controller;
//
//
//import com.gxa.k12.auth.service.SmsService;
//import com.gxa.k12.auth.utils.JsonResult;
//import com.gxa.k12.common.exception.BusinessException;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//
///**
// * @Author ming ming
// * @Date 2021/7/6 16:02
// * @Version 1.0
// */
//@RequestMapping("/sms")
//@RestController
//@Api(description = "登录接口文档")
//public class SmsController {
//
//    @Resource
//    private SmsService smsService;
//
//    @RequestMapping(value = "/login")
//    @ApiOperation(value = "发送一键登录短信",notes = "发送一键登录短信",httpMethod = "POST")
//    public JsonResult sendLoginSms(@RequestParam("phone") String phone ,@RequestParam("password") String password) throws BusinessException {
//        if(!phone.matches("^[1](([3][0-9])|([4][5,7,9])|([5][0-9])|([6][6])|([7][3,5,6,7,8])|([8][0-9])|([9][8,9]))[0-9]{8}$")){
//            throw new BusinessException("手机号码格式不合法");
//        }
//
//        smsService.sendLoginSms(phone,password);
//        JsonResult jsonResult = new JsonResult();
//        jsonResult.setCode("1");
//        jsonResult.setMsg("短信发送成功");
//        return  jsonResult;
//
//    }
//}